package com.sec.typhoondatapush.enums;

/**
 * job状态的枚举变量
 *
 * @author zhuwq
 * @version V1.0
 * @date 2018/7/30- 15:11
 */
public enum ConfigEnum {
    /**
     * code - message
     * 0 - 启用
     * 1 - 禁用
     */
    STATUS_START("0", "启用"),
    STATUS_STOP("1", "禁用");
    private String code;
    private String message;

    ConfigEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String findByMessage(String code) {
        for (ConfigEnum configEnum : ConfigEnum.values()) {
            if (configEnum.code.equals(code)) {
                return configEnum.getMessage();
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
